luci-app-adblock: sync with adblock-4.2.0
authorDirk Brenken <[email protected]>
Fri, 9 Aug 2024 15:16:09 +0000 (17:16 +0200)
committerDirk Brenken <[email protected]>
Fri, 9 Aug 2024 15:16:09 +0000 (17:16 +0200)
* add hagezi support

Signed-off-by: Dirk Brenken <[email protected]>
applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js
applications/luci-app-adblock/po/templates/adblock.pot

index 846689e945c438f8aa1b52a7bf2c0ee9f5301999..da93bc38a082420d3b8fa2f997058e469d04c7dc 100644 (file)
@@ -593,6 +593,22 @@ return view.extend({
                o.optional = true;
                o.rmempty = true;
 
+               o = s.taboption('sources', form.DummyValue, '_sub');
+               o.rawhtml = true;
+               o.default = '<em><b>Hagezi List Selection</b></em>';
+
+               o = s.taboption('sources', form.DynamicList, 'adb_hag_sources', _('Variants'));
+               for (var i = 0; i < categories.length; i++) {
+                       code = categories[i].match(/^(\w+);/)[1].trim();
+                       if (code === 'hag') {
+                               list = categories[i].match(/^\w+;(.*);/)[1].trim();
+                               path = categories[i].match(/^.*;(.*$)/)[1].trim();
+                               o.value(path, list);
+                       }
+               }
+               o.optional = true;
+               o.rmempty = true;
+
                return m.render();
        },
        handleReset: null
index c79653e5ed5e899f74fa35c08e7973f97627bc64..ee3d7317f0e25671e1b7d9673db7c4e60bf2cf20 100644 (file)
@@ -726,6 +726,7 @@ msgid "Unable to save changes: %s"
 msgstr ""
 
 #: applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js:584
+#: applications/luci-app-adblock/htdocs/luci-static/resources/view/adblock/overview.js:600
 msgid "Variants"
 msgstr ""